export default function Login(
  state = {
    refresh_token: '',
    token: '',
  },
  action
) {
  const { type, payload } = action
  if (type === 'login/token') {
    return payload
  }
  // 清除token
  if (type === 'login/out') {
    return {
      refresh_token: '',
      token: '',
    }
  }
  return state
}
